﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace IP_PROJECT
{
    public partial class About : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Save_Click(object sender, EventArgs e)
        {
            RepeaterItem item = AboutRepeater.Items[0];
            LoginView loginView = (LoginView)item.FindControl("AdminView");
            TextBox textBox = (TextBox)loginView.FindControl("AboutEditBox");
            DataClassesDataContext db = new DataClassesDataContext();
            var result = from u in db.Maps
                         where u.View == "About"
                         select u;
            Map map = result.First();
            map.Value = textBox.Text;
            db.SubmitChanges();
        }
    }
}